<?php
class Contact_Model extends CI_Model
{
	function __construct() {
        parent::__construct();
    }
	function saveContact($contact_id,$data)
	{
      if($contact_id>0){
          $this->db->where('contact_id',$contact_id);
          $this->db->update('contact',$data);
      }else{
        if($this->db->insert('contact',$data)){
              return $this->db->insert_id();
        }else{
              return false;
        }
      }
	}
}
?>
